package util;

import org.lwjgl.opengl.GL11;

public class Triangle extends Drawable {
	public Point p1;
	public Point p2;
	public Point p3;
	
	public Triangle (Point p1, Point p2, Point p3) {
		this.p1 = p1;
		this.p2 = p2;
		this.p3 = p3;
		this.p1.setVisible(false);
		this.p2.setVisible(false);
		this.p3.setVisible(false);
	}
	
	@Override
	public void draw() {
		GL11.glColor3f(0.5f, 0.5f, 0.5f);
		GL11.glPushMatrix();		
		GL11.glBegin(GL11.GL_TRIANGLES);
			GL11.glVertex2f(p1.x, p1.y);
			GL11.glVertex2f(p2.x, p2.y);
			GL11.glVertex2f(p3.x, p3.y);
		GL11.glEnd();
		GL11.glPopMatrix();
	}
}
